package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class SignedInteger {

    private int beginIndex;
    private int endIndex;
    private Sign sign;
    private UnsignedInteger unsignedInteger;

    public SignedInteger(Sign sign, UnsignedInteger unsignedInteger) {
        if (sign == null) {
            this.beginIndex = unsignedInteger.getBeginIndex();
        } else {
            this.beginIndex = sign.getBeginIndex();
        }
        this.endIndex = unsignedInteger.getEndIndex();
        this.sign = sign;
        this.unsignedInteger = unsignedInteger;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public Sign getSign() {
        return sign;
    }

    public UnsignedInteger getUnsignedInteger() {
        return unsignedInteger;
    }

}
